{if $do == 'account'}
<div class="main">
	<div class="search">
		<table class="table table-bordered tb">
			<tbody>
				<tr>
					<th>公众号名称</th>
					<td><input id="wKeyword" type="text" class="span6" value="{$_GPC['keyword']}" /></td>
				</tr>
				 <tr class="search-submit">
					 <td colspan="2"><button class="btn pull-right span2" onclick="aW.query();"><i class="icon-search icon-large"></i> 搜索</button></td>
				 </tr>
			</tbody>
		</table>
	</div>
	<div class="account">
		<table class="table table-bordered tb">
			<thead>
				<tr>
					<th>公众号码</th>
					<th>当前所属用户</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				{loop $wechats $row}
				<tr>
					<td>{$row['name']}</td>
					<td>{if $row['owner']}<span class="label label-success">当前用户</span>{else}{$row['member']['username']}{/if}</td>
					<td>{if $row['owner']}<a href="javascript:;" onclick="aW.revo('{$row['weid']}');">收回管理权限</a>{else}<a href="javascript:;" onclick="aW.auth('{$row['weid']}');">授权此用户管理</a>{/if}</td>
				</tr>
				{/loop}
			</tbody>
		</table>
		{$pager}
	</div>
</div>
{/if}
{if $do == 'module'}
<div class="main">
	<div class="account">
		<table class="table table-bordered tb">
			<thead>
				<tr>
					<th>模块名称</th>
					<th>模块标识</th>
					<th>功能简述</th>
					<th>可访问否</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				{loop $modules $row}
				<tr>
					<td>{$row['title']}</td>
					<td>{$row['name']}</td>
					<td>{$row['ability']}</td>
					<td>{if $row['owner']}<span class="label label-success">可访问</span>{/if}{if $row['issystem']}<span class="label label-success">系统模块</span>{/if}</td>
					<td>{if !empty($groupsmodules['modules']) && in_array($row['mid'], $groupsmodules['modules'])}<span class="label label-info">继承用户组</span>{else}{if !$row['issystem']}{if $row['owner']}<a href="javascript:;" onclick="aM.revo('{$row['mid']}');">收回访问权限</a>{else}<a href="javascript:;" onclick="aM.auth('{$row['mid']}');">授权此用户访问</a>{/if}{/if}{/if}</td>
				</tr>
				{/loop}
			</tbody>
		</table>
		{$pager}
	</div>
</div>
{/if}
{if $do == 'template'}
<div class="main">
	<div class="account">
		<table class="table table-bordered tb">
			<thead>
				<tr>
					<th>模板名称</th>
					<th>模板标识</th>
					<th>功能简介</th>
					<th>可访问否</th>
					<th></th>
				</tr>
			</thead>
			<tbody>
				{loop $templates $temp}
				<tr>
					<td>{$temp['title']}</td>
					<td>{$temp['name']}</td>
					<td>{$temp['description']}</td>
					<td>{if $temp['owner']}<span class="label label-success">可访问</span>{/if}{if $temp['name'] == 'default'}<span class="label label-success">系统模块</span>{/if}</td>
					<td>{if !empty($groupsmodules['templates']) && in_array($temp['id'], $groupsmodules['templates'])}<span class="label label-info">继承用户组</span>{else}{if $temp['name'] != 'default'}{if $temp['owner']}<a href="javascript:;" onclick="aT.revo('{$temp['id']}');">收回访问权限</a>{else}<a href="javascript:;" onclick="aT.auth('{$temp['id']}');">授权此用户访问</a>{/if}{/if}{/if}</td>
				</tr>
				{/loop}
			</tbody>
		</table>
		{$pager}
	</div>
</div>
{/if}

